<template>
	<view class="p20">
		<view class="" v-html="list">

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: "",
				list: ""
			}
		},
		onLoad(option) {


			this.type = option.type
			if (this.type == 3) {
				uni.setNavigationBarTitle({
					title: '用户服务协议'
				})
			}
			if (this.type == 4) {
				uni.setNavigationBarTitle({
					title: '隐私协议'
				})
			}
			if (this.type == 8) {
				uni.setNavigationBarTitle({
					title: '数据解析协议'
				})
			}
			
			this.postlist()
		},
		methods: {
			postlist() {
				this.api.post('login/getConfig', {
					type: this.type,
				}).then(res => {
					console.log(res);
					if (res.code == 200) {
						this.list = res.data
					}
				})
			},
		}
	}
</script>

<style>

</style>